Some LaTeX guidance

General LaTeX (pronounced lay-tek or lah-tek) is a document preparation system consisting of a set of macros for Donald Knuth's typesetting system, TeX. The iso style is, in its turn, a set of LaTeX macros. This has two implications: firstly that the facilities of LaTeX (and TeX) are available to users of the iso style, and secondly that iso style users should really have some knowledge of LaTeX before embarking on production of a standard.

This annex gives a very brief summary of some of the more pertinent features of LaTeX. For more information, and examples, users should read, ``LaTeX: A Document Preparation System'' by Leslie Lamport (Addison-Wesley), the source text of this document and the iso.sty file, probably in that order. Typesetting enthusiasts should also read, ``The TeXbook'' by Donald Knuth (Addison-Wesley).

Document layout LaTeX input is essentially free-format, with spaces, tabs and newlines used as separators. The important exception to this is that a blank line is regarded as a separator between paragraphs, so blank lines must be used with some care.

Commands are introduced by the \ character, e.g. \annex is a command to start on the annexes part of a standard. Command parameters are enclosed in braces ({}), e.g. \label{intro} creates a label called intro.

Comments are introduced by the % character. This comments out everything to the next newline. There are no ``bracketed comments'' as in Pascal or C.

Braces ({}) are used for scoping: any change of style introduced after a { is reversed by the matching }.

Fonts LaTeX provides a number of fonts, the most useful of which are: roman, emphatic, bold, italic and typewriter (fixed width). These are introduced by \rm, \em, \bf, \it and \tt respectively. The scope of these commands lasts until the next } so, to set a phrase in bold, you enter {\bf bold phrase}, to give bold phrase.

Labels and references Any point in a standard may be labelled, using the command \label{labelname}. This gives labelname the value of its division number in the document. For instance, \label{latex.ref} at this point in this document gives latex.ref the value of [*].

A label may be referred to at any time by use of the command \ref{labelname}. Thus the label latex.ref is referred to by \ref{latex.ref}, giving the value [*].

Tables and figures General It is impossible to give more than an inkling of the variety of tables and figures available in LaTeX in this document. Suffice it to say that almost any collection of material that you want tabulated can be set in LaTeX with the tabular environment and that many line drawings can be produced with the picture environment. As always, the LaTeX book has the details.

Tables Tables are set using the table environment. Anything can be put in a table, but usually it will be something set using the tabular environment. The table environment then decides where the table should go on the page, captions it and puts an entry in the list of tables. Table [*] was produced with the following input:

\begin{table}
\begin{center}
\begin{tabular}{|l||l|}
\hline
English & American \\
\hline
pavement & sidewalk \\
colour & color \\
prologue & prolog \\
yes & affirmative
\hline
\end{tabular}
\end{center}
\caption{Translations}
\label{table.example}
\end{table}

The [hb] indicates that the table should be set either here (h) or at the bottom of the page (b).

The caption will be set where you put it in the table environment: at the bottom in this case. The label declaration must either be inside the argument to \caption or after it in the table environment.


Table: Translations
English American
pavement sidewalk
colour color
prologue prolog
yes affirmative


A list of all tables in your document may be obtained by putting a listoftables command in your document (see [*]).

Figures Figures are set using the figure environment. Anything can be put in a figure, but usually it will be something set using the picture environment. The figure environment then decides where the figure should go on the page, captions it and puts an entry in the list of figures. Figure [*] was produced with the following input:

\begin{figure}[hb]
\begin{center}
\setlength{\unitlength}{1mm}
\begin{picture}(50,50)(-25,-25)
\put(0,0){\circle{40}}
\put(0,0){\vector(-4,3){5}}
\put(0,0){\vector(1,0){5}}
\end{picture}
\caption{Stands the clock at ten to three}
\label{figure.example}
\end{center}
\end{figure}
A list of all figures in your document may be obtained by putting a listoffigures command in your document (see [*]).

Figure: Stands the clock at ten to three
\begin{figure}\begin{center}\setlength{\unitlength}{1mm}
\begin{picture}(50,5...
...ctor(-4,3){5}}
\put(0,0){\vector(1,0){5}}
\end{picture}
\end{center}\end{figure}

Unusual characters Most [#!charset!#] characters are easy to obtain by just typing them. Others have a special meaning to LaTeX and are therefore less easy to enter. A list of these and some other useful characters is shown in table [*]

Table: Useful characters
LaTeX input Output
  '
  ''
  ``
\# #
\$ $
\% %
\& &
\tilde ˜
\_ _
\caret  
\bslash  
\{ {
\} }
\copyright ©
\pounds £


See section [*] for some more useful characters provided by the iso style.

Columns The ISO guidelines ask for standards to be set in two columns. However, it is sometimes necessary to use single column text. This may be effected by using the \onecolumn command. Return to two column text with the \twocolumn command. See annex [*] for an example of single column typesetting.

Both of these commands start a new page and should therefore be used with discretion: the best place is prior to starting a new section.

Verbatim text It is sometimes necessary to display text in a fixed width font. LaTeX provides the verbatim environment for this purpose. Text enclosed between \begin{verbatim} and \end{verbatim} is set exactly as in the input file, in the fixed width font. For example:
\begin{example}
\begin{verbatim}Some text
with odd spacing
and line
breaks\end{verbatim}
\end{example}
is set as:

Some text
  with   odd spacing
   and line
 breaks

The maximum number of characters that can be fitted into a single column is about 45.

The iso style allows for the creation of multiple, differently named, verbatim environments. See [*] for details.